package com.suning.sawp.service.impl.bi.support;

import com.suning.istore.common.bi.ftp.BIProcesser;
import com.suning.istore.common.integration.BufferedActionLineProcessor;

/**
 * 只能作为单例使用<br/>
 * 增加批量处理失败异常恢复的功能
 * 
 * @author 13071602
 *
 * @param <T>
 */
public abstract class SimpleReportableBIFileContext extends ReportableBIFileContext {
    public <T> SimpleReportableBIFileContext(final BIProcesser<T> biProcesser, String lineDelimiter) {
        this.setLineDelimiter(lineDelimiter);
        this.setLineProcessor(new BufferedActionLineProcessor<T>(biProcesser.getClazz(), biProcesser.getLineMapper(),
                biProcesser.getAction(), DEFAULT_BATCH_SIZE, this));
    }
}
